package com.zang.string;

/**
 * @author ZVerify
 * @since 2022/10/15 10:36
 * @see <a href="https://leetcode.cn/problems/reverse-string/">...</a>
 **/
public class 翻转字符串 {

    public void reverseString(char[] s) {

        int left = 0;
        int right = s.length-1;
        while (left<right){
            s[left]^=s[right];
            s[right]&=s[left];
            s[left]&=s[right];
            left++;
            right--;
        }
    }
}
